﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO.Compression;
using System.Media;
using System.Diagnostics;


namespace FileAlarm
{
    public partial class PUBG : Form
    {
        private List<string> filelist = new List<string>();
        private string Game_Path = "";

        bool TestRun = true;
        private bool windowCreate = true;
        public PUBG()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            textBox_Game_Path.Enabled = false;
            try { File.Delete("pubgcheckconfig.ini"); }
            catch { }
            try { Directory.Delete(".\\TslGame", true); }
            catch { }
            if (!Directory.Exists("Paks"))
            {
                Directory.CreateDirectory("Paks");
            }
            using (FileStream fs = new FileStream("pak.info", FileMode.OpenOrCreate, FileAccess.Read))
            {
                using (StreamReader m_streamReader = new StreamReader(fs))
                {
                    m_streamReader.BaseStream.Seek(0, SeekOrigin.Begin);
                    string strLine = m_streamReader.ReadLine();
                    while (strLine != null)
                    {
                        filelist.Add(strLine);
                        strLine = m_streamReader.ReadLine();
                    }
                }
            }
            if (filelist.Count == 0)
            {
                filelist.Add("pakchunk0-WindowsNoEditor.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_animations.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_asset_registry.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_building.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_building_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_avartar_female.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_avartar_female_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_avartar_male.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_female.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_female_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_male.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_char_male_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_etc.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_vegetation.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_vegetation_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_world.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_assets_world_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_bps.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_config.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_fx.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_fx_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_item.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_item_attachment.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_item_equip.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_localize.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_localize_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_maps.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_maps_etc.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_mutable.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_sound.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_bps.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_console.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_font.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_hud.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_hud_observer.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_inventory.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_lobby.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_option.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_ui_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_accessories.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_ammunition.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_melee_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_pisotol.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_pisotol_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_rifle.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_rifle_tex.pak");
                filelist.Add("pakchunk0-WindowsNoEditor_weapon_tex.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_building.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_building_tex.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_etc.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_source_vegetation.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_vegetation.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_vegetation_tex.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_world.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_assets_world_tex.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_bps.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_fx.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_fx_tex.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_maps.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_material.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui_bps.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui_console.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui_hud.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui_lobby.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui_option.pak");
                filelist.Add("pakchunk1-WindowsNoEditor_ui_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_animations.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_avartar_female.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_avartar_female_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_avartar_male.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_avartar_male_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_female.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_female_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_male.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_male_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_assets_char_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_bps.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_fx.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_fx_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_item.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_mutable.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_sound.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_ui_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_vehicle.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_vehicle_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_accessories.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_accessories_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_ammunition.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_ammunition_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_grenades.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_grenades_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_melee.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_melee_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_pisotol.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_pisotol_tex.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_rifle.pak");
                filelist.Add("pakchunk1000-WindowsNoEditor_weapon_rifle_tex.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_animations.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_assets.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_bps.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_fx.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_fx_tex.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_mutable.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_sound.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_buggy.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_buggy_tex.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_dacia.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_dacia_tex.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_motorcycle.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_motorcycle_tex.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_tex.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_uaz.pak");
                filelist.Add("pakchunk1100-WindowsNoEditor_vehicle_uaz_tex.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_assets.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_assets_char.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_assets_char_tex.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_bps.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_fx.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_fx_tex.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_item.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_item_attachment.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_item_equip.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_item_outgame.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_sound.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_weapon.pak");
                filelist.Add("pakchunk1200-WindowsNoEditor_weapon_tex.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_assets.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_assets_artifact.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_assets_textures_buildings.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_assets_textures_common.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_assets_textures_vegetation.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_assets_world.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_0.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_1.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_2.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_3.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_4.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_5.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_6.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_grid_7.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_heightmap.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_heightmap_0.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_heightmap_1.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_heightmap_2.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_heightmap_3.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_0.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_1.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_2.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_3.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_4.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_5.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_6.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_7.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_8.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_idclevel_9.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_lod.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_map_base.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_mergedactors.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_objects.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_sound.pak");
                filelist.Add("pakchunk5000-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_artifact.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_textures_artifact.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_textures_buildings.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_textures_common.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_textures_common_exterior.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_textures_common_interior.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_textures_vegetation.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_assets_world.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_0.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_1.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_2.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_3.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_4.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_5.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_6.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_grid_7.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_heightmap.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_heightmap_0.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_heightmap_1.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_heightmap_2.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_heightmap_3.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_0.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_1.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_2.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_3.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_4.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_5.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_6.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_7.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_8.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_idclevel_9.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_lod.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_map_base.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_mergedactors.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_objects.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_sound.pak");
                filelist.Add("pakchunk5100-WindowsNoEditor_ui.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets_artifact.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets_textures_artifact.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets_textures_buildings.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets_textures_common.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets_textures_vegetation.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_assets_world.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_etc.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_grid.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_grid_0.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_grid_1.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_grid_2.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_grid_3.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_heightmap.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_heightmap_0.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_heightmap_1.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_heightmap_2.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_heightmap_3.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_0.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_1.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_2.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_3.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_4.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_5.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_6.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_idclevel_7.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_lod.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_map_base.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_mergedactors.pak");
                filelist.Add("pakchunk5200-WindowsNoEditor_ui.pak");


                using (FileStream fs = new FileStream("pak.info", FileMode.Create))
                {
                    using (StreamWriter m_streamWrite = new StreamWriter(fs))
                    {
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_animations.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_asset_registry.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_building.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_building_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_avartar_female.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_avartar_female_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_avartar_male.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_female.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_female_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_male.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_char_male_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_etc.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_vegetation.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_vegetation_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_world.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_assets_world_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_bps.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_config.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_fx.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_fx_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_item.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_item_attachment.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_item_equip.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_localize.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_localize_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_maps.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_maps_etc.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_mutable.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_sound.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_bps.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_console.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_font.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_hud.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_hud_observer.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_inventory.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_lobby.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_option.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_ui_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_accessories.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_ammunition.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_melee_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_pisotol.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_pisotol_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_rifle.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_rifle_tex.pak");
                        m_streamWrite.WriteLine("pakchunk0-WindowsNoEditor_weapon_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_building.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_building_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_etc.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_source_vegetation.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_vegetation.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_vegetation_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_world.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_assets_world_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_bps.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_fx.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_fx_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_maps.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_material.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui_bps.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui_console.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui_hud.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui_lobby.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui_option.pak");
                        m_streamWrite.WriteLine("pakchunk1-WindowsNoEditor_ui_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_animations.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_avartar_female.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_avartar_female_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_avartar_male.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_avartar_male_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_female.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_female_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_male.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_male_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_assets_char_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_bps.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_fx.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_fx_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_item.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_mutable.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_sound.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_ui_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_vehicle.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_vehicle_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_accessories.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_accessories_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_ammunition.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_ammunition_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_grenades.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_grenades_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_melee.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_melee_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_pisotol.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_pisotol_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_rifle.pak");
                        m_streamWrite.WriteLine("pakchunk1000-WindowsNoEditor_weapon_rifle_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_animations.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_assets.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_bps.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_fx.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_fx_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_mutable.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_sound.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_buggy.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_buggy_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_dacia.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_dacia_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_motorcycle.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_motorcycle_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_uaz.pak");
                        m_streamWrite.WriteLine("pakchunk1100-WindowsNoEditor_vehicle_uaz_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_assets.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_assets_char.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_assets_char_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_bps.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_fx.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_fx_tex.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_item.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_item_attachment.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_item_equip.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_item_outgame.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_sound.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_weapon.pak");
                        m_streamWrite.WriteLine("pakchunk1200-WindowsNoEditor_weapon_tex.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_assets.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_assets_artifact.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_assets_textures_buildings.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_assets_textures_common.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_assets_textures_vegetation.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_assets_world.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_0.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_1.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_2.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_3.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_4.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_5.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_6.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_grid_7.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_heightmap.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_heightmap_0.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_heightmap_1.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_heightmap_2.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_heightmap_3.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_0.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_1.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_2.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_3.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_4.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_5.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_6.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_7.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_8.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_idclevel_9.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_lod.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_map_base.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_mergedactors.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_objects.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_sound.pak");
                        m_streamWrite.WriteLine("pakchunk5000-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_artifact.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_textures_artifact.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_textures_buildings.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_textures_common.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_textures_common_exterior.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_textures_common_interior.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_textures_vegetation.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_assets_world.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_0.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_1.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_2.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_3.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_4.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_5.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_6.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_grid_7.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_heightmap.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_heightmap_0.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_heightmap_1.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_heightmap_2.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_heightmap_3.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_0.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_1.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_2.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_3.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_4.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_5.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_6.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_7.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_8.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_idclevel_9.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_lod.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_map_base.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_mergedactors.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_objects.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_sound.pak");
                        m_streamWrite.WriteLine("pakchunk5100-WindowsNoEditor_ui.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets_artifact.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets_textures_artifact.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets_textures_buildings.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets_textures_common.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets_textures_vegetation.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_assets_world.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_etc.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_grid.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_grid_0.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_grid_1.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_grid_2.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_grid_3.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_heightmap.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_heightmap_0.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_heightmap_1.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_heightmap_2.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_heightmap_3.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_0.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_1.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_2.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_3.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_4.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_5.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_6.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_idclevel_7.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_lod.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_map_base.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_mergedactors.pak");
                        m_streamWrite.WriteLine("pakchunk5200-WindowsNoEditor_ui.pak");
                    }
                }
            }

            FileInfo fiwav = new FileInfo("notice.wav");
            if (!fiwav.Exists)
            {
                byte[] Save = global::FileAlarm.Properties.Resources.notice;
                FileStream fsObj = new FileStream("notice.wav", FileMode.Create);
                fsObj.Write(Save, 0, Save.Length);
                fsObj.Close();
            }
            FileInfo fi = new FileInfo("pubgpath.ini");
            if (fi.Exists)
            {
                FileStream fs = new FileStream(@"pubgpath.ini", FileMode.Open);
                byte[] array = new byte[fs.Length];
                fs.Read(array, 0, array.Length);
                this.textBox_Game_Path.Text = Encoding.Default.GetString(array);
                fs.Close();
            }
            else
            {
                FileStream fs = new FileStream(@"pubgpath.ini", FileMode.CreateNew);
                byte[] array = Encoding.Default.GetBytes(@"D:\Games\Steam\steamapps\common\PUBG");
                fs.Write(array, 0, array.Length);
                this.textBox_Game_Path.Text = @"D:\Games\Steam\steamapps\common\PUBG";
                fs.Close();
            }

            Game_Path = this.textBox_Game_Path.Text;

            DirectoryInfo dir = new DirectoryInfo(".\\Paks");
            foreach (FileInfo file in dir.GetFiles("*.zip"))
            {
                this.checkedListBox1.Items.Add(file.Name);
            }
            Thread a = new Thread(TestFiles);
            a.IsBackground = true;
            a.Start();

        }

        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Visible = true;
            this.WindowState = FormWindowState.Normal;
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Visible = false;
            e.Cancel = true;
            //if (MessageBox.Show("是否隐藏程序？", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            //{
            //    this.Visible = false;
            //    e.Cancel = true;
            //}
            //else
            //{
            //    e.Cancel = false;
            //}
        }

        void TestFiles()
        {
            while (TestRun)
            {
                string PAK_PATH = Game_Path + @"\TslGame\Content\Paks";
                string PAK_MAP = PAK_PATH + @"\" + filelist[0];

                string filenotok = "";
                DirectoryInfo dir = new DirectoryInfo(PAK_PATH);

                if (dir.Exists)
                {

                    foreach (FileInfo file in dir.GetFiles())
                    {
                        if (!filelist.Contains(file.Name))
                        {
                            //未隐藏
                            filenotok = filenotok + file.Name + "\n";
                        }
                    }
                    if (filenotok != "")
                    {
                        FileInfo fi = new FileInfo(PAK_MAP);
                        if (fi.Exists)
                        {
                            try
                            {
                                FileStream fs = new FileStream(PAK_MAP, FileMode.Open);
                                StatusLab_Change("PAK目录存在非官方文件\n游戏未运行!\n文件列表:\n" + filenotok);
                                fs.Close();
                                this.button_Create.Enabled = true;
                            }
                            catch (IOException)
                            {
                                System.Media.SystemSounds.Exclamation.Play();
                                try
                                {
                                    SoundPlayer sound = new SoundPlayer("notice.wav");
                                    sound.Play();
                                }
                                catch (Exception)
                                { }
                                StatusLab_Change("PAK目录存在非官方文件\n游戏运行!!!!请注意开启保护\n文件列表:" + filenotok);
                                this.button_Create.Enabled = false;
                            }
                        }
                        else
                        {
                            StatusLab_Change("请选择正确的游戏目录!");
                        }

                    }
                    else
                    {
                        StatusLab_Change("PAK目录正常或已经成功开启保护");
                    }
                }
                else
                {
                    StatusLab_Change("请选择正确的游戏目录!");
                }
                int count = 30;
                while (count > 0 && TestRun)
                {
                    Thread.Sleep(100);
                    count = count - 1;
                }
            }
        }

        delegate void Button2_change_CallBack(bool bEnable);
        private void Button2_change(bool bEnable)
        {
            if (InvokeRequired)
            {
                Button2_change_CallBack d = new Button2_change_CallBack(Button2_change);
                this.Invoke(d, new object[] { bEnable });
            }
            else
            {
                this.button_Create.Enabled = bEnable;
            }
        }

        delegate void StatusLab_Change_CallBack(string status);
        private void StatusLab_Change(string status)
        {
            if (InvokeRequired)
            {
                StatusLab_Change_CallBack d = new StatusLab_Change_CallBack(StatusLab_Change);
                this.Invoke(d, new object[] { status });
            }
            else
            {
                this.label3.Text = status;
            }
        }



        private void Form1_Activated(object sender, EventArgs e)
        {
            if (windowCreate)
            {
                this.Visible = false;
                windowCreate = false;
            }
        }


        private void button2_Click(object sender, EventArgs e)
        {
            this.label3.Text = "生成中...";
            this.button_Create.Text = "生成中..";
            this.button_Create.Enabled = false;
            byte[] Save = global::FileAlarm.Properties.Resources.Ue4exe;
            FileStream fsObj = new FileStream("Ue4.exe", FileMode.Create);
            fsObj.Write(Save, 0, Save.Length);
            fsObj.Close();
            Save = global::FileAlarm.Properties.Resources.Ue4txt;
            fsObj = new FileStream("Ue4.txt", FileMode.Create);
            fsObj.Write(Save, 0, Save.Length);
            fsObj.Close();
            Save = global::FileAlarm.Properties.Resources.unzipexe;
            fsObj = new FileStream("unzip.exe", FileMode.Create);
            fsObj.Write(Save, 0, Save.Length);
            fsObj.Close();

            TestRun = false; //这里让监控线程退出...以便好操作文件...
            try
            {
                Directory.Delete(".\\TslGame", true);
            }
            catch
            {
            }
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
            {
                if (checkedListBox1.GetItemChecked(i))
                {
                    Process zipprocess = new Process();
                    ProcessStartInfo zipstartInfo = new ProcessStartInfo("unzip.exe", "-o -q \".\\Paks\\" + checkedListBox1.GetItemText(checkedListBox1.Items[i])+"\"");
                    zipprocess.StartInfo = zipstartInfo;
                    zipprocess.StartInfo.UseShellExecute = true;
                    zipprocess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                    zipprocess.Start();
                    StatusLab_Change("正在执行 [ " + checkedListBox1.GetItemText(checkedListBox1.Items[i]) + " ] 功能");
                    zipprocess.WaitForExit();
                }
            }

            Process myprocess = new Process();
            ProcessStartInfo startInfo = new ProcessStartInfo("Ue4.exe", @"TslGame-WindowsNoEditor_wd.pak -create=Ue4.txt -encrypt -encryptindex -aes=45DD15D6DD2DA50AEB71CE7A5284CF8EA498B2EC3D52B7E336F3EA0071CE44B3");
            myprocess.StartInfo = startInfo;
            myprocess.StartInfo.UseShellExecute = true;
            myprocess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
            myprocess.Start();
            StatusLab_Change("正在生成 PAK 文件");
            myprocess.WaitForExit();

            string PAK_PATH = Game_Path + @"\TslGame\Content\Paks";
            string PAK_MAP = PAK_PATH + @"\TslGame-WindowsNoEditor_maps.pak";
            string PAK_WD = PAK_PATH + @"\TslGame-WindowsNoEditor_wd.pak";

            TestRun = false;
            int k = 10;
            while (File.Exists(PAK_WD) && k > 0)
            {
                k--;
                try
                {
                    File.Delete(PAK_WD);
                }
                catch
                {
                    StatusLab_Change("文件删除失败!重试中...");
                }
                Thread.Sleep(1000);
            }

            if (File.Exists(PAK_WD))
            {
                StatusLab_Change("文件删除失败!请确认是否开启保护?");

            }
            else
            {

                System.IO.File.Copy("TslGame-WindowsNoEditor_wd.pak", PAK_WD, true);
            }

            this.button_Create.Text = "生成PAK";
            this.button_Create.Enabled = true;
            TestRun = true;
            try { Directory.Delete(".\\TslGame", true); }
            catch { }
            try { File.Delete("Ue4.exe"); }
            catch { }
            try { File.Delete("Ue4.txt"); }
            catch { }
            try { File.Delete("unzip.exe"); }
            catch { }
            try { File.Delete("TslGame-WindowsNoEditor_wd.pak"); }
            catch { }
            Thread a = new Thread(TestFiles);
            a.IsBackground = true;
            a.Start();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            checkedListBox1.Items.Clear();
            DirectoryInfo dir = new DirectoryInfo(".\\Paks");
            foreach (FileInfo file in dir.GetFiles("*.zip"))
            {
                this.checkedListBox1.Items.Add(file.Name);
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("你需要退出程序吗?", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            if (result == DialogResult.OK)
            {
                try { File.Delete("notice.wav"); }
                catch { }
                try { File.Delete("Ue4.exe"); }
                catch { }
                try { File.Delete("Ue4.txt"); }
                catch { }
                try { File.Delete("unzip.exe"); }
                catch { }
                try { File.Delete("TslGame-WindowsNoEditor_wd.pak"); }
                catch { }

                this.notifyIcon1.Dispose();
                System.Environment.Exit(0);
            }
        }

        private void button5_Click(object sender, EventArgs e)
        {
            //确定
            this.textBox_Game_Path.Enabled = true;
            FolderBrowserDialog P_File_Folder = new FolderBrowserDialog();
            if (P_File_Folder.ShowDialog() == DialogResult.OK)
            {
                Game_Path = P_File_Folder.SelectedPath;
            }
            this.textBox_Game_Path.Text = Game_Path;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            this.textBox_Game_Path.Enabled = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //清理文件
            StatusLab_Change("文件清理中,请等待...");
            TestRun = false;
            string PAK_PATH = Game_Path + @"\TslGame\Content\Paks";
            string PAK_MAP = PAK_PATH + @"\TslGame-WindowsNoEditor_maps.pak";

            List<string> Del_PAK_list = new List<string>();
            DirectoryInfo dir = new DirectoryInfo(PAK_PATH);

            foreach (FileInfo file in dir.GetFiles())
            {
                if (!filelist.Contains(file.Name))
                {
                    //未隐藏
                    Del_PAK_list.Add(PAK_PATH + "\\" + file.Name);
                }
            }

            while (Del_PAK_list.Count > 0)
            {
                foreach (string delfile in Del_PAK_list)
                {
                    try { File.Delete(delfile); }
                    catch { }
                }
                Del_PAK_list.Clear();
                foreach (FileInfo file in dir.GetFiles())
                {
                    if (!filelist.Contains(file.Name))
                    {
                        Del_PAK_list.Add(PAK_PATH + "\\" + file.Name);
                    }
                }
            }
            TestRun = true;
            StatusLab_Change("文件清理成功");
            Thread a = new Thread(TestFiles);
            a.IsBackground = true;
            a.Start();
        }

        private void exit(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("确认退出?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            if (result == DialogResult.OK)
            {
                try { File.Delete("notice.wav"); }
                catch { }
                try { File.Delete("Ue4.exe"); }
                catch { }
                try { File.Delete("Ue4.txt"); }
                catch { }
                try { File.Delete("unzip.exe"); }
                catch { }
                try { File.Delete("TslGame-WindowsNoEditor_wd.pak"); }
                catch { }
                try { File.Delete("pubgcheckconfig.ini"); }
                catch { }
                try { Directory.Delete(".\\TslGame", true); }
                catch { }

                this.notifyIcon1.Dispose();
                System.Environment.Exit(0);
            }
        }
    }
}
